package cn.xuguowen.user.designPatten.chain_of_responsibility.article.function_interface;

import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;

/**
 * ClassName: ArticleContext
 * Package: cn.xuguowen.user.designPatten.chain_of_responsibility
 * Description: 上下文对象
 *
 * @Author 徐国文
 * @Create 2023/6/2 10:38
 * @Version 1.0
 */
public class ArticleContext {

    /**
     * 规则校验检查结果
     */
    private ArticleCheckResult articleCheckResult = new ArticleCheckResult();

    public ArticleCheckResult articleCheckResult() {
        return articleCheckResult;
    }

    /**
     *
     * @return true表示有错误
     */
    public boolean hasError() {
        return CollectionUtils.isNotEmpty(articleCheckResult.getFailedMsgList());
    }



}
